package com.polaris.live.net.service

import com.polaris.live.common.network.ApiResponse
import com.polaris.live.resp.back_resp.CallPromotionResp
import com.polaris.live.resp.back_resp.DiscountPriceResp
import com.polaris.live.resp.back_resp.GainCoinResp
import com.polaris.live.resp.back_resp.GiftDetailResp
import com.polaris.live.resp.back_resp.GiftReceivedResp
import com.polaris.live.resp.back_resp.GiftsRespItem
import com.polaris.live.resp.back_resp.GoogleRechargeVerifyVo
import com.polaris.live.resp.back_resp.PayerLampCarouselResp
import com.polaris.live.resp.back_resp.PayerLampHistoryResp
import com.polaris.live.resp.back_resp.PayerLampLotteryResp
import com.polaris.live.resp.back_resp.PayerLampProgressResp
import com.polaris.live.resp.back_resp.PayerLampResp
import com.polaris.live.resp.back_resp.PayerRechargeDailyRewardsPriceResp
import com.polaris.live.resp.back_resp.PayerRechargePriceListVo
import com.polaris.live.resp.back_resp.PayerRechargeWeekPackPriceResp
import com.polaris.live.resp.back_resp.PayerShopResp
import com.polaris.live.resp.back_resp.PayerShopSuccessResp
import com.polaris.live.resp.back_resp.RechargeCoinPurchasePriceResp
import com.polaris.live.resp.back_resp.RechargePrepareResp
import com.polaris.live.resp.back_resp.RechargePriceResp
import com.polaris.live.resp.back_resp.WithdrawAccountInfoVo
import com.polaris.live.resp.back_resp.WithdrawAccountResp
import com.polaris.live.resp.base.ListResp
import com.polaris.live.resp.go_resp.GooglePlayTestVerifyBean
import com.polaris.live.resp.go_resp.GooglePlayVerifyBean
import com.polaris.live.resp.go_resp.LastWithdrawAccountResp
import com.polaris.live.resp.go_resp.RechargeCoinPurchaseRequest
import com.polaris.live.resp.go_resp.RechargePrepareBean
import com.polaris.live.resp.go_resp.RechargeRewardsDailyRequest
import com.polaris.live.resp.go_resp.SaveWithdrawAccountBean
import com.polaris.live.resp.go_resp.ShopBuyRequest
import retrofit2.http.Body
import retrofit2.http.DELETE
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Query

/**
 * PayerService
 *
 * @author Created by 半仙 on 2023/9/4/004 13:44
 */
interface PayerService {

    /**
     * 充值列表
     */
    @GET("recharge/price")
    suspend fun rechargePrice(): ApiResponse<RechargePriceResp>

    /**
     * 礼物列表查询
     */
    @GET("gifts")
    suspend fun getGiftList(): ApiResponse<List<GiftsRespItem>>

    /**
     * 今日特价查询
     */
    @GET("recharge/today/promotion/price")
    suspend fun getTodayPromotion(): ApiResponse<List<PayerRechargePriceListVo>>

    /**
     * 查询提现账号信息
     */
    @GET("withdraw/account/list")
    suspend fun getWithdraw(): ApiResponse<WithdrawAccountResp>

    /**
     * 删除提现账号信息
     */
    @DELETE("withdraw/account/delete")
    suspend fun deleteWithdraw(@Query("accountId") accountId: Int): ApiResponse<Any>

    /**
     * 提现
     */
    @POST("withdraw/V2")
    suspend fun withdrawV2(@Body withdrawBean: WithdrawAccountInfoVo): ApiResponse<Any>

    /**
     * 保存选中提现账号
     */
    @POST("withdraw/selected/save")
    suspend fun saveWithdraw(@Body saveWithdrawAccountBean: SaveWithdrawAccountBean): ApiResponse<Any>

    /**
     * 查询上次选中的提现账户
     */
    @GET("withdraw/last/selected")
    suspend fun lastWithdraw(): ApiResponse<LastWithdrawAccountResp>

    /**
     * 我的页面优惠充值价格查询
     */
    @GET("recharge/my/rewards/price")
    suspend fun getDiscountPrice(): ApiResponse<DiscountPriceResp>

    /**
     * 历史礼物列表
     */
    @GET("total/historical/gifts/received")
    suspend fun getGiftReceived(@Query("userId") userId: Long): ApiResponse<List<GiftReceivedResp>>

    /**
     * 历史用户某个礼物赠送记录
     */
    @GET("historical/received/id")
    suspend fun getGiftDetail(@Query("giftId") giftId: Long): ApiResponse<List<GiftDetailResp>>

    /**
     * call页面悬浮窗价格查询
     */
    @GET("recharge/call/promotion/price")
    suspend fun getCallPromotion(): ApiResponse<List<CallPromotionResp>>

    /**
     * 订单充值授权
     */
    @POST("recharge/prepare")
    suspend fun rechargePrepare(@Body bean: RechargePrepareBean): ApiResponse<RechargePrepareResp>

    /**
     * 测试环境临时充值接口
     */
    @POST("test/recharge")
    suspend fun testCharge(@Body bean: GooglePlayTestVerifyBean): ApiResponse<Any>

    /**
     * google支付验签
     */
    @POST("google/verify")
    suspend fun googleVerify(@Body bean: GooglePlayVerifyBean): ApiResponse<GoogleRechargeVerifyVo>

    /**
     * 根据价格id获取价格
     */
    @GET("recharge/price")
    suspend fun getPrice(@Query("priceId") priceId: String): ApiResponse<Double>

    /**
     * 7日限时礼包查询
     */
    @GET("recharge/week/pack/price")
    suspend fun getWeekPrice(): ApiResponse<List<PayerRechargeWeekPackPriceResp>>

    /**
     * 充值活动-每日领取
     */
    @GET("recharge/daily/rewards/price")
    suspend fun getRechargeAc(): ApiResponse<List<PayerRechargeDailyRewardsPriceResp>>

    /**
     * 充值活动-领取奖励
     */
    @POST("rewards/daily/receive")
    suspend fun receiveRechargeAc(@Body payerRechargeRewardsDailyRequest: RechargeRewardsDailyRequest): ApiResponse<Any>

    /**
     *商品列表
     */
    @GET("shop")
    suspend fun getShopList(
        @Query("shopType") shopType: Int,
        @Query("objectType") objectType: Int,
        @Query("pageNumber") pageNumber: Int,
        @Query("pageSize") pageSize: Int,
    ): ApiResponse<ListResp<PayerShopResp>>

    /**
     * 购买商品
     */
    @POST("shop/buy")
    suspend fun shopBuy(@Body request: ShopBuyRequest): ApiResponse<PayerShopSuccessResp>

    /**
     * beans兑换 价格档位
     */
    @POST("coin/purchase/price")
    suspend fun purchasePrice(@Body request: String): ApiResponse<RechargeCoinPurchasePriceResp>

    /**
     * beans兑换
     */
    @POST("coin/purchase")
    suspend fun purchase(@Body request: RechargeCoinPurchaseRequest): ApiResponse<GainCoinResp>


    /**
     *获取当前房间神灯信息
     */
    @GET("lamp")
    suspend fun getLamp(
        @Query("userId") userId: Long,
    ): ApiResponse<PayerLampResp>

    /**
     *获取直播间神灯进度
     */
    @GET("lamp/progress")
    suspend fun getLampProgress(
        @Query("userId") userId: Long,
    ): ApiResponse<PayerLampProgressResp>


    /**
     *中奖历史
     */
    @GET("lamp/history")
    suspend fun getLampHistory(
        @Query("pageNumber") pageNumber: Int,
        @Query("pageSize") pageSize: Int,
    ): ApiResponse<ListResp<PayerLampHistoryResp>>

    /**
     *获取轮播信息
     */
    @GET("lamp/carousel")
    suspend fun getLampCarousel(
        @Query("userId") userId: Long,
    ): ApiResponse<PayerLampCarouselResp>

    /**
     *抽奖
     */
    @GET("lamp/lottery")
    suspend fun getLampLottery(
        @Query("userId") userId: Long,
        @Query("index") index: Long,
    ): ApiResponse<PayerLampLotteryResp>
}